package br.com.honorato.dao;

import javax.persistence.EntityManager;

import br.com.honorato.exception.DAOException;
import br.com.honorato.logger.LoggerInterceptor;
import br.com.honorato.model.UserApp;
import br.com.honorato.util.dao.CompareFilter;
import br.com.honorato.util.dao.ETypeCompare;

public class UserAppDAO extends JpaDAO<UserApp>
{
	private static final long serialVersionUID = 1291101069692295470L;

	public UserAppDAO(EntityManager manager)
	{
		super(manager);
	}

	@LoggerInterceptor
	public UserApp getBylogin(String login) throws DAOException
	{
		CompareFilter.setFilter(ETypeCompare.EQUAL, "login", login, (UserAppDAO) this);
		// BetweenFilter.setFilter("data",new Date(new Date().getTime()), new
		// Date(), (UserAppDAO)this);
		return recoverySingleByPredicate(UserApp.class);
	}

}